From 93e5d83a9da46a2c9a3b95a7a6f1296ecd49fdc9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 26 Mar 2013 21:27:21 -0400 Subject: [PATCH] Don't decrement the init_ref_count towards -infinity Once we are at zero, initialization is done. --- gdk/wayland/gdkscreen-wayland.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c index 5d1768882a..1acc81aa3d 100644 --- a/gdk/wayland/gdkscreen-wayland.c +++ b/gdk/wayland/gdkscreen-wayland.c @@ -872,8 +872,10 @@ output_handle_geometry(void *data, monitor->output_name = g_strdup (model); /* Once we have the geometry event we know we have all events - * from the wl_output and need no further init roundtrips. */ - display->init_ref_count--; + * from the wl_output and need no further init roundtrips. + */ + if (display->init_ref_count > 0) + display->init_ref_count--; } static void -- 2.30.2